package com.example.demo.websocket.controller;

import com.example.demo.websocket.support.WebSocketServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author lys4134
 * @ClassName SocketController
 * @Date 2022/03/22 17:15:48
 * @Description SocketController
 * @Version 1.0
 **/
@Controller
public class SocketController {

    @Autowired
    private WebSocketServer webSocketServer;

    @RequestMapping("/index")
    public String index() {
        return "index";
    }

    @GetMapping("/webSocket")
    public String socket() {
        return "webSocket";
    }


}
